function getRouters() {
  return [
    {
      'path': '/acl',
      'component': 'Layout',
      'name': 'Acl', // 命名路由
      meta: {
        title: '权限管理',
        hidden: false,
        icon: 'Lock',
        always: true,
        permissionID: '123',
      },
      children: [
        {
          path: '/user',
          // component: () => "import('@/views/acl/user/index.vue')",
          component: () => "@/views/acl/user/index.vue",
          name: 'User',
          meta: {
            title: '用户管理',
            hidden: false,
            icon: 'User',
          },
        },
        {
          path: '/rule',
          // component: () => "import('@/views/acl/rule/index.vue')",
          component: () => "@/views/acl/rule/index.vue",
          name: 'Rule',
          meta: {
            title: '角色管理',
            hidden: false,
            icon: 'UserFilled',
          },
        },
        {
          path: '/permission',
          // component: () => "import('@/views/acl/permission/index.vue')",
          component: () => "@/views/acl/permission/index.vue",
          name: 'Permission',
          meta: {
            title: '菜单管理',
            hidden: false,
            icon: 'Grid',
          },
        },
      ],
    },
    {
      path: '/product',
      component: 'Layout',
      name: 'Product', // 命名路由
      meta: {
        title: '商品管理',
        hidden: false,
        icon: 'ShoppingBag',
        always: true,
      },
      children: [
        {
          path: '/trademark',
          component: () => "@/views/product/trademark/index.vue",
          name: 'Trademark',
          meta: {
            title: '品牌管理',
            hidden: false,
            icon: 'ShoppingCart',
          },
        },
        {
          path: '/attr',
          component: () => "@/views/product/attr/index.vue",
          name: 'Attr',
          meta: {
            title: '属性管理',
            hidden: false,
            icon: 'Avatar',
          },
        },
        {
          path: '/spu',
          component: () => "@/views/product/spu/index.vue",
          name: 'Spu',
          meta: {
            title: 'SPU管理',
            hidden: false,
            icon: 'PartlyCloudy',
          },
        },
        {
          path: '/sku',
          component: () => "@/views/product/sku/index.vue",
          name: 'Sku',
          meta: {
            title: 'SKU管理',
            hidden: false,
            icon: 'Sunset',
          },
        },
      ],
    },
  ]
}

export default [
  // 获取品牌
  {
    url: '/mock/getRouters',
    method: 'get',
    response: () => {
      // 没有 返回失败信息
      if (!getRouters().length) {
        return {
          code: 201,
          data: {
            message: '获取失败,请联系管理员',
          },
        }
      }
      // 如果有 则返回成功信息
      return {
        code: 200,
        data: getRouters()
      }
    },
  },
]
